#include<reg52.h>
#define uint unsigned int 
sbit D1=P1^0;
sbit D2=P1^1;
sbit D3=P1^2;
sbit D4=P1^3;
sbit D5=P1^4;
sbit D6=P1^5;
sbit D7=P1^6;
sbit D8=P1^7;

void delay(uint x)
{
uint a,b;
for(a=x;a>0;a--)
	for(b=110;b>0;b--);
}

void main()
{
	  D1=D2=D3=D4=D5=D6=D7=D8=1;
    while(1)
    {
			D1=0;
			delay(500);
			D1=1;
			D2=0;
			delay(500);
			D2=1;
			D3=0;
			delay(500);
			D3=1;
			D4=0;
			delay(500);
			D4=1;
			D5=0;
			delay(500);
			D5=1;
			D6=0;
			delay(500);
			D6=1;
			D7=0;
			delay(500);
			D7=1;
			D8=0;
			delay(500);
			D8=1;
		
    }
}